{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Project2 - Host program"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.2971155643463135 seconds to program bitstream\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import time\n",
    "\n",
    "from pynq import Overlay\n",
    "import pynq.lib.dma\n",
    "from pynq import Xlnk\n",
    "from pynq import MMIO\n",
    "\n",
    "o1 = Overlay('/home/xilinx/jupyter_notebooks/detector/detector.bit')\n",
    "# Download your bitstream to FPGA\n",
    "t_before_bitstream = time.time()\n",
    "o1.download()\n",
    "t_after_bitstream = time.time()\n",
    "\n",
    "print(t_after_bitstream - t_before_bitstream, 'seconds to program bitstream')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "dmaIR = ol.streamPh.dma_I_R # First DMA\n",
    "dmaQT = ol.streamPh.dma_Q_T # Second DMA\n",
    "ph_ip = ol.streamPh.phasedetector # Your IP\n",
    "\n",
    "xlnk = Xlnk() # Contiguous Memory Allocator (CMA)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "length = 1024\n",
    "\n",
    "# Open input/output files\n",
    "fI = open('input_i.dat','r')\n",
    "fQ = open('input_q.dat','r')\n",
    "fG = open('out_gold.dat', 'r')\n",
    "\n",
    "# Allocate regular numpy arrays to store input and output\n",
    "inp_I = np.empty([length,], dtype=np.float32)\n",
    "inp_Q = np.empty([length,], dtype=np.float32)\n",
    "golden_R = np.empty([length,], dtype=np.float32)\n",
    "golden_T = np.empty([length,], dtype=np.float32)\n",
    "\n",
    "# Store data into arrays\n",
    "for i in range (0, length):\n",
    "    golden_R[i], golden_T[i] = [np.float32(x) for x in next(fG).split()]\n",
    "    inp_I[i] = np.float32(next(fI))\n",
    "    inp_Q[i] = np.float32(next(fQ))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0xaf3c18f0>]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJztnXucXEWZ93/PzORGuCUQYiRAQCKIqIAjwsqiEkBkXEFlUbwQlDXrK+/CurzLwroLr4oyygrii7BGA0ZAINwMC8gtJEIIhEzu1yGTZMJMkslMkpnJ3Ge6u94/+pzu0911zqlzus6lzzzfz2c+05fq51SdqnrqOU9VPUVCCDAMwzCVT1XUGWAYhmH0wAqdYRgmIbBCZxiGSQis0BmGYRICK3SGYZiEwAqdYRgmIbBCZxiGSQis0BmGYRICK3SGYZiEUBPmxY4++mgxY8aMMC/JMAxT8axcuXKfEGKKW7pQFfqMGTPQ0NAQ5iUZhmEqHiLaqZKOXS4MwzAJgRU6wzBMQmCFzjAMkxBYoTMMwyQEVugMwzAJgRU6wzBMQmCFzjAMkxASo9Dbewbx8sY213SLt7Rjd9eAY5oDfcN4Yf0eV1mvv9uB9/b3O6bpHhjBs2t3u8patm0ftnf0OqbpH07hmdWtrrLe2XEAW/f2OKYZHEnjyZWtcDuCcOXOTmzafdAxzUg6gwUNLchknGWtbenC+tZuxzTpjMCCFS1IpTOO6Tbu7sbq9zod0wgh8ERDC4ZTzrIa23rQ0HzAVdZTK1sxMJx2TNfU3ou3tu13TAMAC9fsQs/giGOanfv7sHTrPldZz6/bg67+Ycc0rZ39WNLY7irrxQ1t2Nc75JimrXsQr27a6y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FIB/FkIctH4nskN5xS9BIqIvAGgXQqyMOi8hUQPgLAD3CyHOBNCH/CM5gETV7SQAlyE7iL0fwESUuicSTdzqshIUutJh1JUGEY1BVpk/IoR42vh4LxFNM76fBqDd+LyS78GnAHyRiJoBPIas2+UeAEcSkXlilrU8ubIa3x8BYH+YGS6TVgCtQojlxvsnkVXwSazbCwHsEEJ0CCFGADyNbH0ntW5NvNZlaHVcCQo9cYdRExEBmAdgsxDiLstXzwIwZ8BnI+tbNz+/2phFPwdAt+WRL9YIIW4RQkwXQsxAtu5eE0J8A8BiAFcYyYrLat6DK4z0sbGA3BBCtAFoIaJTjI9mAdiEBNYtsq6Wc4joEKNNm2VNZN1a8FqXLwG4mIgmGU81Fxuf6SfqCQfFSYlLAbwLYBuAH0adHw3lOQ/Zx7R1ANYYf5ci609cBGArgFcBTDbSE7IrfbYBWI/sqoLIy+Gj3J8B8Jzx+iQA7wBoAvAEgHHG5+ON903G9ydFnW8f5TwDQINRv38GMCmpdQvgRwC2ANgA4CEA45JUtwAeRXZ+YATZp69r/dQlgO8Y5W4C8O2g8ss7RRmGYRJCJbhcGIZhGAVYoTMMwyQEVugMwzAJgRU6wzBMQmCFzjAMkxBYoTMMwyQEVugMwzAJgRU6wzBMQvj/r6hfZhDs3DcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xaf3a0c50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(golden_R)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0xaed15170>]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl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Pgb53wMgL3IfqoDKKh72xnAWUi9zPoAaAun26Kgidu9TJJiXw+gv2m7X3pfomGMtUBKqT/DOZ+a3r2JMdY7/XtvAJvT+5N8DY4C8D3G2CoAzyPljnkQQCfGmLGEu/l8Muea/r0jgK1RNjgk6wCs45x/kd5+GSlFX4j39mQAKznnVZzzegBTkbrfhXpvDfzey8jucZIU+1cABqdH2lsiNTjzep7bFArGGAPwTwCLOOd/Mv30OgBjxPxipHzvxv6L0qPuYwHsNH0KxhrO+Y2c836c8zKk7t17nHQSVPYAAAEcSURBVPMLAbwP4IfpYvZzNa7BD9PlY2MRecE53whgLWNsaHrXSQAWogDvLVIumLGMsTbpPm2ca0HeWxN+7+UMAKcyxjqnv3JOTe/TT74HJHwOXpwOYCmAFQBuznd7NJzP0Uh9vs0FMDv973Sk/I0zASwD8C6ALunyDKnIoBUA5iEVhZD38whw3scDeDP99yAAXwJYDuAlAKXp/a3S28vTvw/Kd7sDnOdoAJXp+/sqgM6Fem8B3AFgMYD5AP4FoLSQ7i2A55AaP6hH6mvs8iD3EsBl6fNeDuDSXLWXZp4SBEEUGElyxRAEQRAKkGInCIIoMEixEwRBFBik2AmCIAoMUuwEQRAFBil2giCIAoMUO0EQRIFBip0gCKLA+H/vScAkiA2DgAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xaf33ca70>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(golden_T)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Golden thetas at the R peaks are:\n",
      " 0.015529000200331211\n",
      " 0.047508999705314636\n",
      " 0.07948499917984009\n",
      " 0.1115259975194931\n",
      " 0.1434909999370575\n",
      " 0.1754709929227829\n",
      " 0.2074970006942749\n",
      " 0.23947599530220032\n",
      " 0.27150198817253113\n",
      " 0.3034819960594177\n",
      " 0.3355030119419098\n",
      " 0.367482990026474\n",
      " 0.399507999420166\n",
      " 0.4314880073070526\n",
      " 0.4635140001773834\n",
      " 0.49549400806427\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(\"Golden thetas at the R peaks are:\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n\".format(golden_T[31],golden_T[63],golden_T[95],golden_T[127],golden_T[159],golden_T[191],golden_T[223],golden_T[255],golden_T[287],golden_T[319],golden_T[351],golden_T[383],golden_T[415],golden_T[447],golden_T[479],golden_T[511]))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Complete the following block"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Allocate CMA array for DMA\n",
    "xlnk = Xlnk()\n",
    "# Copy regular numpy arrays to CMA arrays\n",
    "dma1 = o1.detector.axi_dma_0\n",
    "dma2 = o1.detector.axi_dma_1\n",
    "# Write length using MMIO (we got the address from Vivado)\n",
    "detector_ip = MMIO(0x43c00000,0x10000)\n",
    "\n",
    "size = 1024\n",
    "in_buffer1 = xlnk.cma_array(shape=(size,), dtype=np.float32)\n",
    "in_buffer2 = xlnk.cma_array(shape=(size,), dtype=np.float32)\n",
    "out_bufferT = xlnk.cma_array(shape=(size,), dtype=np.float32)\n",
    "out_bufferR = xlnk.cma_array(shape=(size,), dtype=np.float32)\n",
    "\n",
    "fI = open('input_i.dat','r')\n",
    "fQ = open('input_q.dat','r')\n",
    "fG = open('out_gold.dat', 'r')\n",
    "for i in range (0, size):\n",
    "    in_buffer1[i] = np.float32(next(fI))\n",
    "    in_buffer2[i] = np.float32(next(fQ))\n",
    "    \n",
    "detector_ip.write(0x10,size)\n",
    "t_start = time.time()\n",
    "# Begin data transfer from/to DMA\n",
    "dma1.sendchannel.transfer(in_buffer1)\n",
    "dma2.sendchannel.transfer(in_buffer2)\n",
    "dma1.recvchannel.transfer(out_bufferT)\n",
    "dma2.recvchannel.transfer(out_bufferR)\n",
    "dma1.sendchannel.wait()\n",
    "dma2.sendchannel.wait()\n",
    "dma1.recvchannel.wait()\n",
    "dma2.recvchannel.wait()\n",
    "t_stop = time.time()\n",
    "\n",
    "# Free the CMA buffers\n",
    "in_buffer1.close()\n",
    "in_buffer2.close()\n",
    "out_bufferR.close()\n",
    "out_bufferT.close()\n",
    "\n",
    "print(t_after_bitstream - t_before_bitstream, 'seconds to execute on hardware')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.plot(out_bufferR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.plot(out_bufferT)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Output thetas at the R peaks are:\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n {}\\n\".format(out_bufferT[31],out_bufferT[63],out_bufferT[95],out_bufferT[127],out_bufferT[159],out_bufferT[191],out_bufferT[223],out_bufferT[255],out_bufferT[287],out_bufferT[319],out_bufferT[351],out_bufferT[383],out_bufferT[415],out_bufferT[447],out_bufferT[479],out_bufferT[511]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
